﻿CREATE TABLE [dbo].[tblOwner] (
    [OwnerID]                   INT IDENTITY (1, 1) NOT NULL,
    [LongName]                  NVARCHAR (100) NOT NULL,
    [ShortName]                 NVARCHAR (50)  NULL,
    [PreferredCarrierCode]      int       NULL,
	[RetryCardDelay]			int null,
	[RetryCardCount]			int null,
	[PackingSlipReport]			nvarchar(50) null,
	[ProcessorCode]				char(1) null,
	[Active]					bit null,
    [AllowPartialShipments]     BIT NOT NULL
);
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Defines an order.', @level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOwner';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The long version of the owner name.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOwner',
	@level2type = N'COLUMN', @level2name = N'LongName';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The short version of the owner name.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOwner',
	@level2type = N'COLUMN', @level2name = N'ShortName';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Indicates whether this owner wants to allow shipments to be broken into parts if some portion is on backorder.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOwner',
	@level2type = N'COLUMN', @level2name = N'AllowPartialShipments';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Links to codeCarrier.  Indicates the carrier that the owner prefers to use if none is specified on the order.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOwner',
	@level2type = N'COLUMN', @level2name = N'PreferredCarrierCode';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The number of days between retry attempts on soft declines.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOwner',
	@level2type = N'COLUMN', @level2name = N'RetryCardDelay';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The number of times to retry a soft decline on payment processing.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOwner',
	@level2type = N'COLUMN', @level2name = N'RetryCardCount';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Defines the default packing slip.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOwner',
	@level2type = N'COLUMN', @level2name = N'PackingSlipReport';
GO;
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Links to codePaymentProcessor.  Indicates the payment processor to use if none is specified on import.', 
	@level0type = N'SCHEMA', @level0name = N'dbo',
	@level1type = N'TABLE', @level1name = N'tblOwner',
	@level2type = N'COLUMN', @level2name = N'ProcessorCode';
GO;

